package com.shuangti.community.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.shuangti.community.entity.CommunityPostTbl;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;


@Mapper
public interface CommunityPostMapper extends BaseMapper<CommunityPostTbl> {

    @Select("select * from community_posts where user_id = #{user_id} limit #{page},#{count}")
    List<CommunityPostTbl> selectPostsById(@Param("user_id") Integer user_id,
                                           @Param("page") Integer page,
                                           @Param("count") Integer count);

}
